package com.hydra.auth.common;

/**
 * @author Andrew
 * @create 2020/2/14 9:57 上午
 */
public enum SerialNoRuleEnum {

    YEAR,
    MONTH,
    DAY,
    FOREVER;

    public static SerialNoRuleEnum getByName(String name) {
        if (name == null) {
            return null;
        }
        for (SerialNoRuleEnum ruleEnum : values()) {
            if (ruleEnum.name().equals(name)) {
                return ruleEnum;
            }
        }
        return null;
    }
}

